package com.yihukurama.sysbase.sysservice;


import com.yihukurama.base.app.exception.TipsException;
import com.yihukurama.base.framework.web.dto.Request;
import com.yihukurama.base.framework.web.dto.Result;
import com.yihukurama.sysbase.controller.vo.RouterVo;
import com.yihukurama.sysbase.framework.domain.Menu;
import com.yihukurama.sysbase.framework.domain.User;

import java.util.List;

/**
 * @Description: 系统服务
 * @Author yihukurama
 * @Date: Created in 17:56 2023/1/16
 * @Modified: by yihukurama in 17:56 2023/1/16
 */
public interface ISystem {

    /**
     * 说明： 修改密码
     * @Author yihukurama
     * @date: Created in 15:49 2023/12/12
     * @modified: by yihukurama in 15:49 2023/12/12
     * @param request 原密码 新密码
     * @return 修改是否成功
     */
    Result changePassword(Request<User> request) throws TipsException;

    /**
     * 登出
     * @param request
     * @return
     * @throws TipsException
     */
    Result logout(Request<User> request) throws TipsException;

    /**
     * 获取菜单、功能，匹配vue
     * @param request
     * @return
     * @throws TipsException
     */
    Result getRoutes(Request<User> request) throws TipsException;


    /**
     * 创建前端需要的菜单结构
     * @param menus
     * @return
     */
    List<RouterVo> buildMenus(List<Menu> menus);
}
